package executable.instance;

public class ClassWithIntArray {

    private int[] values;

    public int[] getValues() {
        return values;
    }

    public void setValues(int[] values) {
        this.values = values;
    }

    //////////static

    public static int[] returnNullReference() {
        final ClassWithIntArray classWithIntArray = new ClassWithIntArray();
        return classWithIntArray.getValues();
        // test if reference is sett tu null
    }

    public static int setAndReadSimple() {
        final ClassWithIntArray classWithIntArray = new ClassWithIntArray();
        final int[] intArray = new int[5];
        intArray[2] = 5;
        classWithIntArray.setValues(intArray);
        classWithIntArray.getValues()[2] += 5;
        final int[] intValuesTmp = classWithIntArray.getValues();
        return intValuesTmp[2];
    }

}
